2
Introduction
2
Throughout the book, the emphasis is for you to find a practical solution by using
simple concepts and reusing code that you will find in this book. You will find here
working code for several interesting scenarios and you can use these as building
blocks for your own personalized solutions.
Chapter 1 introduces the concept of algorithms and presents this learning as the
heart of all computing endeavors. It discusses the origins of the word and explains it
in simple terms.
Chapter 2 takes you through a step-by-step process to create a game that almost
everyone has played in their childhood—thus establishing the main principles of
writing a program with a simple introduction to user interfaces. This is the second
longest chapter that lays the foundation for teaching a few more advanced skills that
are presented in the following chapters. The biggest barrier to program development
is the fear of failure—this fear paralyzes most individuals who are not in the com
puting profession. The techniques described in this chapter will help get over this fear
by teaching you how to “debug” your program—no matter how small—and under
stand which part is not working, so that it can be quickly corrected and lead you to a
successful run.
Chapter 3 describes how to automate a very popular puzzle—Sudoku. This chapter
teaches a few new skills such as discovering patterns based on tuples and exploring
deductive logic to solve a complex riddle. Sudoku is fun. But solving Sudoku by
developing algorithms for each technique is ten times more fun!
Chapter 4 discusses the concept of multiplatform integration by introducing a
problem of controlling a powerpoint presentation from a smartphone and then solving
it through simple programming techniques. It also demonstrates that innovation can
be achieved in simple things if you put your mind to it.
Chapter 5 teaches how to handle files through a very innovative exercise—creating
a filing cabinet for your computer files while introducing the concept of recursion.
Chapter 6 discusses the workbook merge problem—how to combine multiple
sheets into one without having to open each one and manually cut and paste. While
the code is simple, it saves a lot of time and repetitive effort.
Chapter 7 introduces the topic of graphs by teaching you how to convert three col
umns of text to a graphical architecture diagram automatically, through the use of the
spreadsheet. This program is a very useful tool for system engineers to visualize how
data are exchanged between different components of a complex system.
Chapter 8 builds on the graphical concepts of Chapter 6 by solving the reverse
problem—how to convert a graph to text.
Chapter 9 teaches a fundamental technique of web scraping—a skill that is essen
tial for automating all kinds of tasks that need pulling data from the web. It teaches
the complex part of pulling these data where data retrieval requires a “prompt” (e.g.,
a form) and reveals how to automate this prompt.
Chapter 10 explores the character of Professor Butts and Rube Goldberg ma
chines. Through a simple example of a webcam software, it helps you build a
burglar alarm, a customer counter, a remotely activated camera, and a greeting
machine. These examples should serve as an inspiration for you to experiment
with simple programming concepts that you can connect and build, unraveling a
legoland of opportunities.